{% extends 'testpaper/subject/type/question-edit-layout.html.twig' %}

{% set type = 'single_choice' %}

{% block subject %}
  {% for option in question.options|default([]) %}
    <div class="edit-subject-item cd-mb24 form-group">
      <label class="cd-radio col-sm-1 cd-mt8 mlm{% if loop.index-1 in question.answers|default([]) %} checked{% endif %}">
        <input type="radio" data-toggle="cd-radio" name="right" value="{{ loop.index-1 }}">
        <span class="cd-dark-major edit-subject-item__order">{{ (loop.index+64)|chr }}. </span>
      </label>
      <div class="col-sm-6 ph0">
        <input class="form-control edit-subject-item__input js-item-option-edit" type="text" value="{{ question_html_filter(option) }}">
        <textarea class="form-control hidden" style="height:190px;" id="{{ uniqid() }}" name="options"
                  data-image-upload-url="{{ path('editor_upload', {token:upload_token('course')}) }}"
                  data-image-download-url="{{ path('editor_download', {token:upload_token('course')}) }}">{{ option }}</textarea>
      </div>
      <a class="col-sm-1 edit-subject-item__delete cd-link-assist js-item-option-delete" href="javascript:;"><i class="es-icon es-icon-shanchu"></i></a>
    </div>
  {% endfor %}
  <div class="color-primary cd-mv24"><a class="cd-link-primary js-item-option-add" href="javascript:;"><i class="es-icon es-icon-tianjia text-md"></i><span class="text-md mls">{{ 'course.testpaper_manage.import.re_edit.add_option'|trans }}</span></a></div>
{% endblock %}